[DEVELOPMENT ENVIRONMENT]
* NEW: Disable kill buttons correctly in database editor window. [GB.FORM] * BUG: Fix a possible crash in TableView when the editor control is moved. [GB.QT4] * NEW: The GridView Change event is raised when there is no current row now. git-svn-id: svn://localhost/gambas/trunk@3843 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
975d5ad5fb
commit
a3198eeb09
6 changed files with 19 additions and 9 deletions
|
@ -1442,12 +1442,14 @@ Private Sub UpdateFieldToolbar()
|
|||
|
||||
btnDownField.Enabled = tbvField.Row >= 0 And tbvField.Row < (tbvField.Rows.Count - 1)
|
||||
btnUpField.Enabled = tbvField.Row > 0
|
||||
btnKillField.Enabled = tbvField.Row >= 0
|
||||
|
||||
End
|
||||
|
||||
|
||||
Public Sub tbvField_Change()
|
||||
|
||||
Debug tbvField.Row
|
||||
UpdateFieldToolbar
|
||||
|
||||
End
|
||||
|
@ -1456,6 +1458,7 @@ Private Sub UpdateIndexToolbar()
|
|||
|
||||
btnDownIndex.Enabled = CanDownIndex()
|
||||
btnUpIndex.Enabled = CanUpIndex()
|
||||
btnKillIndex.Enabled = tbvIndex.Row >= 0
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -106,18 +106,23 @@ Private Sub MoveEditor()
|
|||
|
||||
If Not $hEditor Then Return
|
||||
|
||||
$bDoNotHideEditor = True
|
||||
|
||||
X = Me.ScreenX - Me.Window.ScreenX - Me.Window.ClientX + Me.Rows.Width - Me.ScrollX + Me.ClientX
|
||||
Y = Me.ScreenY - Me.Window.ScreenY - Me.Window.ClientY + Me.Columns.Height - Me.ScrollY + Me.ClientY
|
||||
|
||||
$bDoNotHideEditor = False
|
||||
|
||||
With Me[$iRow, $iCol]
|
||||
|
||||
X += .X
|
||||
Y += .Y
|
||||
|
||||
If Me.Grid Then
|
||||
$hEditor.Move(X, Y, .Width, .Height)
|
||||
Else
|
||||
$hEditor.Move(X, Y, .Width + 1, .Height + 1)
|
||||
Endif
|
||||
'DEBUG
|
||||
|
||||
' Debug .X;; .Y;; .W;; .H;; "/";; Me.ClientW;; Me.ClientH;; "/";; Me.W;; Me.H
|
||||
'
|
||||
|
|
|
@ -769,10 +769,13 @@ void MyTable::setNumCols(int newCols)
|
|||
void MyTable::setNumRows(int newRows)
|
||||
{
|
||||
bool b;
|
||||
int row, col;
|
||||
|
||||
if (newRows < 0)
|
||||
return;
|
||||
|
||||
getCurrentCell(&row, &col);
|
||||
|
||||
BEGIN_NO_REPAINT
|
||||
{
|
||||
_rows = newRows;
|
||||
|
@ -781,13 +784,14 @@ void MyTable::setNumRows(int newRows)
|
|||
b = signalsBlocked();
|
||||
blockSignals(true);
|
||||
Q3Table::setNumRows(newRows);
|
||||
blockSignals(b);
|
||||
|
||||
clearSelection();
|
||||
blockSignals(b);
|
||||
}
|
||||
END_NO_REPAINT
|
||||
|
||||
setCurrentCell(row, col);
|
||||
emit currentChanged(-1, -1);
|
||||
emit selectionChanged();
|
||||
}
|
||||
|
||||
|
||||
|
@ -2384,8 +2388,8 @@ void CGridView::changed(void)
|
|||
w->updateCurrentCell();
|
||||
w->getCurrentCell(&row, &col);
|
||||
|
||||
if (row < 0 || col < 0)
|
||||
return;
|
||||
//if (row < 0 || col < 0)
|
||||
// return;
|
||||
|
||||
GB.Raise(THIS, EVENT_Change, 0);
|
||||
}
|
||||
|
|
|
@ -889,7 +889,7 @@ static void add_string()
|
|||
const char *end;
|
||||
int i;
|
||||
|
||||
start = source_ptr;
|
||||
start = end = source_ptr;
|
||||
len = 0;
|
||||
newline = 0;
|
||||
jump = FALSE;
|
||||
|
|
|
@ -65,8 +65,8 @@ static bool read_integer(char *number, int base, bool minus, int64_t *result)
|
|||
switch (base)
|
||||
{
|
||||
case 2: nmax = 64; break;
|
||||
case 10: nmax = 19; break;
|
||||
case 16: nmax = 16; break;
|
||||
case 10: default: nmax = 19; break;
|
||||
}
|
||||
|
||||
if (base == 10)
|
||||
|
|
|
@ -408,8 +408,6 @@ void GB_GetProperty(void *object, const char *property)
|
|||
static bool init = FALSE;
|
||||
static GB_FUNCTION func;
|
||||
|
||||
va_list args;
|
||||
|
||||
if (!init)
|
||||
{
|
||||
GB_GetFunction(&func, (void *)CLASS_find("Object"), "GetProperty", NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue