Permalink
Browse files

Fix #3 with deprecated methods in wx3.1

  • Loading branch information...
mariuz committed Mar 31, 2016
1 parent 91e0dfa commit fa6353f1d6aa4f7ab38134e68c4834157ddab084
Showing with 11 additions and 11 deletions.
  1. +2 −2 src/gui/ExecuteSqlFrame.cpp
  2. +2 −2 src/gui/InsertDialog.cpp
  3. +7 −7 src/gui/controls/DataGrid.cpp
@@ -1849,8 +1849,8 @@ void ExecuteSqlFrame::OnMenuGridSetFieldToNULL(wxCommandEvent& WXUNUSED(event))
// if visible, update BLOB editor
if (editBlobDlgM && editBlobDlgM->IsShown()
&& grid_data->GetCursorColumn() == col
&& grid_data->GetCursorRow() == row)
&& grid_data->GetGridCursorCol() == col
&& grid_data->GetGridCursorRow() == row)
{
editBlobDlgM->setBlob(grid_data, dgt, &statementM, row, col, false);
}
View
@@ -223,8 +223,8 @@ InsertDialog::InsertDialog(wxWindow* parent, const wxString& tableName,
gridM->SetCellValue(row, 0, c->getName_());
gridM->SetCellValue(row, 1, c->getDatatype());
gridM->SetCellAlignment(
def->isNumeric() ? wxALIGN_RIGHT : wxALIGN_LEFT, row, 3);
gridM->SetCellAlignment(row, 3,
def->isNumeric() ? wxALIGN_RIGHT : wxALIGN_LEFT, wxALIGN_CENTER);
wxString defaultValue;
if (c->getDefault(ReturnDomainDefault, defaultValue))
@@ -706,9 +706,9 @@ std::vector<bool> DataGrid::getColumnsWithSelectedCells()
{
// fully selected rows cause all columns to have selected cells
if (GetSelectedRows().size() > 0)
return std::vector<bool>(GetCols(), true);
return std::vector<bool>(GetNumberCols(), true);
std::vector<bool> ret(GetCols(), false);
std::vector<bool> ret(GetNumberCols(), false);
// first mark all completely selected columns
wxArrayInt cols(GetSelectedCols());
for (size_t i = 0; i < cols.size(); i++)
@@ -740,9 +740,9 @@ std::vector<bool> DataGrid::getRowsWithSelectedCells()
{
// fully selected columns cause all rows to have selected cells
if (GetSelectedCols().size() > 0)
return std::vector<bool>(GetRows(), true);
return std::vector<bool>(GetNumberRows(), true);
std::vector<bool> ret(GetRows(), false);
std::vector<bool> ret(GetNumberRows(), false);
// first mark all completely selected rows
wxArrayInt rows(GetSelectedRows());
for (size_t i = 0; i < rows.size(); i++)
@@ -777,10 +777,10 @@ std::vector<bool> DataGrid::getSelectedCellsInRow(int row)
for (size_t i = 0; i < rows.size(); i++)
{
if (rows[i] == row)
return std::vector<bool>(GetCols(), true);
return std::vector<bool>(GetNumberCols(), true);
}
std::vector<bool> ret(GetCols(), false);
std::vector<bool> ret(GetNumberCols(), false);
// first mark cells of all completely selected columns
wxArrayInt cols(GetSelectedCols());
for (size_t i = 0; i < cols.size(); i++)
@@ -833,7 +833,7 @@ wxGridCellCoordsArray DataGrid::getSelectedCells()
}
if (result.size() == 0)
result.Add(wxGridCellCoords(wxGrid::GetCursorRow(),wxGrid::GetCursorColumn()));
result.Add(wxGridCellCoords(wxGrid::GetGridCursorRow(),wxGrid::GetGridCursorCol()));
return result;
}

0 comments on commit fa6353f

Please sign in to comment.