git-svn-id: svn://db.shs.com.ru/libs@100 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2016-07-19 19:13:04 +00:00
parent b8238cb7f2
commit feefedf062

View File

@@ -119,6 +119,8 @@ void HistoryView::clear(bool silent) {
QListWidget::clear();
if (!silent) addEntry(-1);
emit clearAvailable(false);
emit redoAvailable(index < count());
emit undoAvailable((index > 1));
}
@@ -131,7 +133,7 @@ void HistoryView::undo() {
void HistoryView::redo() {
if (index > count()) return;
if (index >= count()) return;
index++;
emit commandExecute(history_[index - 1].command);
itemSelectionChanged();