1285 self.__bPosCurrent = self.getSelectionBegin() |
1285 self.__bPosCurrent = self.getSelectionBegin() |
1286 self.setCursorPosition(2 * self.__bPosCurrent) |
1286 self.setCursorPosition(2 * self.__bPosCurrent) |
1287 self.__resetSelection(2 * self.__bPosCurrent) |
1287 self.__resetSelection(2 * self.__bPosCurrent) |
1288 |
1288 |
1289 # if in insert mode, insert a byte |
1289 # if in insert mode, insert a byte |
1290 if not self.__overwriteMode: |
1290 if ( |
1291 if (self.__cursorPosition % 2) == 0: |
1291 not self.__overwriteMode and |
1292 self.insert(self.__bPosCurrent, 0) |
1292 (self.__cursorPosition % 2) == 0 |
|
1293 ): |
|
1294 self.insert(self.__bPosCurrent, 0) |
1293 |
1295 |
1294 # change content |
1296 # change content |
1295 if self.__chunks.size() > 0: |
1297 if self.__chunks.size() > 0: |
1296 hexValue = self.__toHex( |
1298 hexValue = self.__toHex( |
1297 self.__chunks.data(self.__bPosCurrent, 1)) |
1299 self.__chunks.data(self.__bPosCurrent, 1)) |
1425 self.getSelectionBegin() <= posBa and |
1427 self.getSelectionBegin() <= posBa and |
1426 self.getSelectionEnd() > posBa |
1428 self.getSelectionEnd() > posBa |
1427 ): |
1429 ): |
1428 c = self.__selectionBrush.color() |
1430 c = self.__selectionBrush.color() |
1429 painter.setPen(self.__selectionPen) |
1431 painter.setPen(self.__selectionPen) |
1430 elif self.__highlighting: |
1432 elif ( |
1431 if self.__markedShown and self.__markedShown[ |
1433 self.__highlighting and |
1432 posBa - self.__bPosFirst]: |
1434 self.__markedShown and |
1433 c = self.__highlightingBrush.color() |
1435 self.__markedShown[posBa - self.__bPosFirst] |
1434 painter.setPen(self.__highlightingPen) |
1436 ): |
|
1437 c = self.__highlightingBrush.color() |
|
1438 painter.setPen(self.__highlightingPen) |
1435 |
1439 |
1436 # render hex value |
1440 # render hex value |
1437 r = QRect() |
1441 r = QRect() |
1438 if colIdx == 0: |
1442 if colIdx == 0: |
1439 r.setRect( |
1443 r.setRect( |