git-svn-id: svn://db.shs.com.ru/libs@458 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -52,6 +52,7 @@ void HistoryView::addEntry(int action, int count_, const QString & suffix) {
|
|||||||
for (int i = 0; i < index; ++i)
|
for (int i = 0; i < index; ++i)
|
||||||
item(i)->setSelected(true);
|
item(i)->setSelected(true);
|
||||||
blockSignals(false);
|
blockSignals(false);
|
||||||
|
emit changed();
|
||||||
emit redoAvailable(false);
|
emit redoAvailable(false);
|
||||||
emit undoAvailable((index > 1));
|
emit undoAvailable((index > 1));
|
||||||
emit clearAvailable(history_.count() > 1);
|
emit clearAvailable(history_.count() > 1);
|
||||||
@@ -94,6 +95,7 @@ void HistoryView::itemClicked(QListWidgetItem * item) {
|
|||||||
index = row(item) + 1;
|
index = row(item) + 1;
|
||||||
//qDebug() << actions[index - 1].command;
|
//qDebug() << actions[index - 1].command;
|
||||||
emit commandExecute(history_[index - 1].command);
|
emit commandExecute(history_[index - 1].command);
|
||||||
|
emit changed();
|
||||||
itemSelectionChanged();
|
itemSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,6 +147,7 @@ void HistoryView::undo() {
|
|||||||
if (index <= 1) return;
|
if (index <= 1) return;
|
||||||
index--;
|
index--;
|
||||||
emit commandExecute(history_[index - 1].command);
|
emit commandExecute(history_[index - 1].command);
|
||||||
|
emit changed();
|
||||||
itemSelectionChanged();
|
itemSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,5 +156,6 @@ void HistoryView::redo() {
|
|||||||
if (index >= count()) return;
|
if (index >= count()) return;
|
||||||
index++;
|
index++;
|
||||||
emit commandExecute(history_[index - 1].command);
|
emit commandExecute(history_[index - 1].command);
|
||||||
|
emit changed();
|
||||||
itemSelectionChanged();
|
itemSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ signals:
|
|||||||
void clearAvailable(bool);
|
void clearAvailable(bool);
|
||||||
void commandRequest(QByteArray & s);
|
void commandRequest(QByteArray & s);
|
||||||
void commandExecute(const QByteArray & s);
|
void commandExecute(const QByteArray & s);
|
||||||
|
void changed();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user