diff --git a/src/debugger/gui/DataGridWidget.cxx b/src/debugger/gui/DataGridWidget.cxx index fb078ba18..4304ecb0e 100644 --- a/src/debugger/gui/DataGridWidget.cxx +++ b/src/debugger/gui/DataGridWidget.cxx @@ -17,6 +17,7 @@ #include "Widget.hxx" #include "Dialog.hxx" +#include "ToolTip.hxx" #include "Font.hxx" #include "OSystem.hxx" #include "Debugger.hxx" @@ -294,6 +295,7 @@ void DataGridWidget::handleMouseWheel(int x, int y, int direction) else if(direction < 0) incrementCell(); } + dialog().tooltip().hide(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -491,6 +493,7 @@ bool DataGridWidget::handleKeyDown(StellaKey key, StellaMod mod) sendCommand(DataGridWidget::kSelectionChangedCmd, _selectedItem, _id); setDirty(); + dialog().tooltip().hide(); } _currentKeyDown = key; @@ -582,7 +585,8 @@ int DataGridWidget::getToolTipIndex(const Common::Point& pos) const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string DataGridWidget::getToolTip(const Common::Point& pos) const { - const Int32 val = _valueList[getToolTipIndex(pos)]; + const int idx = getToolTipIndex(pos); + const Int32 val = _valueList[idx]; ostringstream buf; buf << _toolTipText diff --git a/src/debugger/gui/RomListWidget.cxx b/src/debugger/gui/RomListWidget.cxx index 236f99a31..c06675e32 100644 --- a/src/debugger/gui/RomListWidget.cxx +++ b/src/debugger/gui/RomListWidget.cxx @@ -20,6 +20,8 @@ #include "Debugger.hxx" #include "DiStella.hxx" #include "Widget.hxx" +#include "Dialog.hxx" +#include "ToolTip.hxx" #include "StellaKeys.hxx" #include "FBSurface.hxx" #include "Font.hxx" @@ -646,6 +648,7 @@ void RomListWidget::startEditMode() return; _editMode = true; + dialog().tooltip().hide(); switch(myDisasm->list[_selectedItem].type) { case Device::GFX: diff --git a/src/debugger/gui/ToggleWidget.cxx b/src/debugger/gui/ToggleWidget.cxx index 4fced1146..ac321f4bf 100644 --- a/src/debugger/gui/ToggleWidget.cxx +++ b/src/debugger/gui/ToggleWidget.cxx @@ -19,6 +19,8 @@ #include "Base.hxx" #include "StellaKeys.hxx" #include "Widget.hxx" +#include "Dialog.hxx" +#include "ToolTip.hxx" #include "ToggleWidget.hxx" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -51,6 +53,7 @@ void ToggleWidget::handleMouseDown(int x, int y, MouseButton b, int clickCount) _selectedItem = newSelectedItem; _currentRow = _selectedItem / _cols; _currentCol = _selectedItem - (_currentRow * _cols); + dialog().tooltip().hide(); setDirty(); } } @@ -182,6 +185,7 @@ bool ToggleWidget::handleKeyDown(StellaKey key, StellaMod mod) _stateList[_selectedItem] = !_stateList[_selectedItem]; _changedList[_selectedItem] = !_changedList[_selectedItem]; sendCommand(ToggleWidget::kItemDataChangedCmd, _selectedItem, _id); + dialog().tooltip().hide(); } setDirty(); diff --git a/src/gui/StringListWidget.cxx b/src/gui/StringListWidget.cxx index a512425b5..536240b8a 100644 --- a/src/gui/StringListWidget.cxx +++ b/src/gui/StringListWidget.cxx @@ -56,9 +56,9 @@ int StringListWidget::getToolTipIndex(const Common::Point& pos) const int idx = (pos.y - getAbsY()) / _lineHeight + _currentPos; if(idx >= int(_list.size())) - return -1; + return -1; else - return idx; + return idx; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -